1. Field of the Invention
The present invention relates to an apparatus, a method, and a computer-readable recording medium for detecting an update of image information written by an application or the like running on a virtual machine.
2. Description of the Related Art
A virtual machine environment in which a plurality of virtual machines is operated by single hardware is implemented in recent years. For example, Xen (http://xen.org/) and VMware (http://vmware.com/) are known as software to control execution of a virtual machine.
A plurality of guest operating systems (OSs) runs on a virtual machine monitor (VMM) in the virtual machine environment. The VMM arbitrates accesses of the guest OSs to a hardware resource. Generally, the VMM controls an access to a network card or the like which is a shared resource, but is not involved in an access of a guest OS to a graphic memory or the like allocated to each guest OS. Therefore, when a screen is to be updated, the guest OS draws image information in the graphic memory, and the VMM has to update the screen based on the image information. However, because the VMM is not involved in the access of the guest OS to the graphic memory, the drawing event of the guest OS is not transmitted to the VMM. The VMM, therefore, needs to have a function of detecting drawing completion by the guest OS and updating the screen.
The way the VMM updates the screen in response to the reception of notification from the guest OS includes two methods as follows.
(1) The VMM detects screen update without explicit notification from the guest OS.
(2) The screen update is explicitly notified from the guest OS to the VMM.
For example, the method of (1) is used in Xen. Specifically, a technique for use in Xen is to poll from the VMM to the guest OS using a timer and check whether the screen is updated without modification of the guest OS.
Meanwhile, the method of (2) is used in VMWare. Specifically, a technique for use in VMWare is to modify a video driver of the guest OS and issue a notification on screen update from the video driver of the guest OS to the VMM at a breakpoint of drawing.
However, in the method of (1), the timing of finishing the drawing in the graphic memory is not detected, and this may cause an image in the middle of drawing to be displayed. Further, in the method of (2), it is necessary to modify the video driver of the guest OS according to a virtual machine environment, which lacks versatility.